import xlwings as xw
app = xw.App(visible=False, add_book=False)
workbook = app.books.open('F:\\python\\第4章\\汽车备案信息.xlsx')
worksheet = workbook.sheets['商用车信息']
r_shape = worksheet.range('A1').expand('table').shape
row_nums = r_shape[0]
col_nums = r_shape[1]
print(r_shape)
print(row_nums, col_nums)
workbook.close()
app.quit()
